package com.yckj.web.uol.service.Impl;

import com.yckj.web.uol.dao.LabmemberMapper;
import com.yckj.web.uol.entity.Labmember;
import com.yckj.web.uol.service.ILabmemberService;
import com.yckj.web.uol.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * @Classname LabmemberImpl
 * @Description TODO
 * @Copyright:Copyright(c) 2021
 * @Company 英才汇硕信息科技有限公司
 * @Author xu
 * @Version 1.0
 * @Date 2021/7/21 22:35
 */
public class LabmemberImpl implements ILabmemberService {
    @Override
    public boolean addMember(Labmember labmember) {
        boolean flag = false;
        SqlSession session = MyBatisUtil.getSession();
        LabmemberMapper mapper = session.getMapper(LabmemberMapper.class);
        int insert = mapper.insert(labmember);
        if (insert>0){
            flag=true;
            System.out.println("添加成功");
        }

        return flag;
    }

}
